package com.operation.net.util;


import java.net.InetAddress;
import java.net.UnknownHostException;


public class GetLocalIp {

   public static String getLocalIp() throws UnknownHostException {
       InetAddress inetAddress=InetAddress.getLocalHost();
       String ip=inetAddress.getHostAddress().toString();//获得本机Ip
       return ip;
   }

}
